<template>
	<main-content
		:tableHeight.sync="tableHeight"
		:otherDependenComponents="otherDependenComponents"
	>
		<template slot="query">
			<el-form
				ref="formRef"
				:inline="true"
				:model="queryData"
				class="flex-warp-container"
			>
				<!--				<el-form-item-->
				<!--					:label="$t('common.belong_merchant') + ':'"-->
				<!--					class="flex-row-container"-->
				<!--					label-width="77px"-->
				<!--				>-->
				<!--					<merchant-select-->
				<!--						v-model="queryData.merchantId"-->
				<!--						:merchantInfo.sync="merchantObj"-->
				<!--					></merchant-select>-->
				<!--				</el-form-item>-->
				<el-form-item
					:label="'统计日期' + ':'"
					class="flex-row-container"
					label-width="77px"
				>
					<el-date-picker
						v-model="searchTime"
						type="daterange"
						range-separator="-"
						:start-placeholder="$t('report.start_date')"
						:end-placeholder="$t('report.end_date')"
						:picker-options="pickerShortcutWithCurrPeriod"
						:clearable="false"
					></el-date-picker>
				</el-form-item>
				<el-form-item
					:label="`${$t('funds.user_name')}:`"
					class="flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model="queryData.userName"
						clearable
						size="medium"
						:placeholder="$t('common.please_enter')"
						v-symbols
						:disabled="loading"
						oninput="value=value.replace(/[\u4E00-\u9FA5]/g ,'')"
						@keyup.enter.native="enterSearch"
					></el-input>
				</el-form-item>

				<el-form-item
					:label="`${$t('common.top_agent')}:`"
					class="flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model="queryData.parentProxyName"
						size="medium"
						clearable
						:maxlength="11"
						autocomplete="off"
						v-symbols
						:placeholder="$t('common.please_enter')"
						oninput="value=value.replace(/[\u4E00-\u9FA5]/g ,'')"
					></el-input>
				</el-form-item>
				<el-form-item
					label="总代账号:"
					class="flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model="queryData.topProxyName"
						clearable
						size="medium"
						:placeholder="$t('common.please_enter')"
						v-symbols
						:disabled="loading"
						oninput="value=value.replace(/[\u4E00-\u9FA5]/g ,'')"
						@keyup.enter.native="enterSearch"
					></el-input>
				</el-form-item>
				<el-form-item
					:label="`${$t('common.number_type')}:`"
					class="flex-row-container"
					label-width="77px"
				>
					<el-select
						v-model="queryData.accountType"
						size="medium"
						:placeholder="$t('common.select_all')"
						clearable
						collapse-tags
					>
						<el-option
							v-for="item in accountTypeArr"
							:key="item.code"
							:label="item.description"
							:value="item.code"
						></el-option>
					</el-select>
				</el-form-item>
				<el-form-item
					:label="`${$t('report.bet_count')}:`"
					class="numberBox flex-row-container"
					label-width="61px"
				>
					<el-input
						v-model="queryData.minBetCount"
						size="medium"
						:placeholder="$t('common.minimum')"
						style="width: 130px"
						maxLength="10"
						v-input="{ name: 'intp' }"
						clearable
						name="minBetCount"
						@blur="
							handleAmount(
								queryData,
								1,
								'minBetCount',
								'maxBetCount',
								$t('report.betCountWarning')
							)
						"
					></el-input>
					-
					<el-input
						v-model="queryData.maxBetCount"
						size="medium"
						:placeholder="$t('common.maximum')"
						style="width: 130px"
						maxLength="10"
						v-input="{ name: 'intp' }"
						name="maxBetCount"
						clearable
						@blur="
							handleAmount(
								queryData,
								2,
								'minBetCount',
								'maxBetCount',
								$t('report.betCountWarning')
							)
						"
					></el-input>
				</el-form-item>
				<el-form-item
					:label="`${$t('report.bet_amount')}:`"
					class="numberBox flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model="queryData.minBetAmount"
						size="medium"
						:placeholder="$t('common.minimum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'float', num: '2' }"
						name="minBetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								1,
								'minBetAmount',
								'maxBetAmount',
								$t('report.betAmountWarning')
							)
						"
					></el-input>
					-
					<el-input
						v-model="queryData.maxBetAmount"
						size="medium"
						:placeholder="$t('common.maximum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'float', num: '2' }"
						name="maxBetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								2,
								'minBetAmount',
								'maxBetAmount',
								$t('report.betAmountWarning')
							)
						"
					></el-input>
				</el-form-item>
				<el-form-item
					:label="`${$t('report.net_amount')}:`"
					class="numberBox flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model="queryData.minNetAmount"
						size="medium"
						:placeholder="$t('common.minimum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'onlyTwoNum' }"
						name="minNetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								1,
								'minNetAmount',
								'maxNetAmount',
								$t('report.netAmountWarning')
							)
						"
					></el-input>
					-
					<el-input
						v-model="queryData.maxNetAmount"
						size="medium"
						:placeholder="$t('common.maximum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'onlyTwoNum' }"
						name="maxNetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								2,
								'minNetAmount',
								'maxNetAmount',
								$t('report.netAmountWarning')
							)
						"
					></el-input>
				</el-form-item>
				<!-- <el-form-item
					:label="`${$t('report.net_profit')}:`"
					class="numberBox flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model="queryData.minNetProfit"
						size="medium"
						:placeholder="$t('common.minimum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'onlyTwoNum' }"
						name="minNetProfit"
						clearable
						@blur="
							handleAmount(
								queryData,
								1,
								'minNetProfit',
								'maxNetProfit',
								$t('report.netProfitWarning')
							)
						"
					></el-input>
					-
					<el-input
						v-model="queryData.maxNetProfit"
						size="medium"
						:placeholder="$t('common.maximum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'onlyTwoNum' }"
						name="maxNetProfit"
						clearable
						@blur="
							handleAmount(
								queryData,
								2,
								'minNetProfit',
								'maxNetProfit',
								$t('report.netProfitWarning')
							)
						"
					></el-input>
				</el-form-item> -->
				<el-form-item>
					<el-button
						type="primary"
						icon="el-icon-search"
						size="medium"
						@click="search"
					>
						{{ $t('common.search') }}
					</el-button>
					<el-button
						icon="el-icon-refresh-left"
						size="medium"
						@click="reset"
					>
						{{ $t('common.reset') }}
					</el-button>
					<el-button
						v-if="hasPermission('701011')"
						type="warning"
						icon="el-icon-download"
						size="medium"
						:loading="exportBtnLoading"
						@click="handleExportExcel"
					>
						{{ $t('common.export') }}
					</el-button>
				</el-form-item>

				<date-picker-shortcuts
					kind="shortcutForButtons"
					:action="handleShortcutBtnClick"
					:loading="loading"
				/>
			</el-form>
			<el-link :underline="false" type="danger">
				{{ $t('report.refresh_warning_text') }}
			</el-link>
		</template>
		<template slot="content">
			<!-- <div @click="recalculationFn">测试</div> -->
			<el-tabs
				:before-leave="beforeLeave"
				v-model="activeName"
				type="card"
				@tab-click="tabClick"
			>
				<el-tab-pane
					v-for="(item, index) in venueNameList"
					:disabled="venueCodeClick"
					:label="item.venueTypeName"
					:key="index"
					:name="item.venueTypeCode"
				></el-tab-pane>
			</el-tabs>
			<el-table
				ref="tableSort"
				v-if="tabTable"
				key="father"
				v-loading="loading"
				element-loading-spinner="el-icon-loading"
				border
				size="mini"
				class="small-size-table"
				:data="tableData"
				@sort-change="changeTableSort"
				highlight-current-row
				:max-height="tableHeight"
				style="width: 100%"
				show-summary
				:summary-method="
					(val) => handleRow(val, subSummary, totalSummary)
				"
				:header-cell-style="getRowClass"
			>
				<el-table-column align="center" label="账号信息">
					<el-table-column
						prop="userName"
						align="center"
						min-width="200"
						:label="'统计日期'"
					>
						<template slot-scope="scope">
							<span>
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="dialogData(scope.row, 'day')"
								>
									{{ scope.row.cycleName }}
								</el-link>
							</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="userName"
						align="center"
						min-width="150"
						:label="$t('common.member_number')"
						show-overflow-tooltip
					>
						<template slot-scope="scope">
							<span v-if="scope.row.memberName">
								<span type="primary">
									{{ scope.row.memberName }}
								</span>
								<i
									class="el-icon-document-copy"
									@click="copy(scope.row.memberName)"
								/>
							</span>
							<span v-else>-</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="userName"
						align="center"
						min-width="150"
						:label="'上级代理'"
						show-overflow-tooltip
					>
						<template slot-scope="scope">
							<span v-if="scope.row.parentProxyName">
								<span>
									{{ scope.row.parentProxyName }}
								</span>
								<i
									class="el-icon-document-copy"
									@click="copy(scope.row.parentProxyName)"
								/>
							</span>
							<span v-else>-</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="userName"
						align="center"
						min-width="150"
						:label="'所属总代'"
						show-overflow-tooltip
					>
						<template slot-scope="scope">
							<span v-if="scope.row.topProxyName">
								<span>
									{{ scope.row.topProxyName }}
								</span>
								<i
									class="el-icon-document-copy"
									@click="copy(scope.row.topProxyName)"
								/>
							</span>
							<span v-else>-</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="userName"
						align="center"
						min-width="150"
						:label="'业务模式'"
						show-overflow-tooltip
					>
						<template slot-scope="scope">
							{{
								mappingBusinessModel(scope.row.businessModel) ||
									'-'
							}}
						</template>
					</el-table-column>
				</el-table-column>

				<template>
					<el-table-column
						v-if="activeName === 'all'"
						align="center"
						label="德州水保增"
					>
						<el-table-column
							prop="dxClubBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'德州俱乐部注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.dxClubBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeRoundAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部局服务费'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部局服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="统计会员被收取的局服务费"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxClubServiceChargeRoundAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeHandAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部手牌服务费'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部手牌服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="统计会员被收取的手牌服务费"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxClubServiceChargeHandAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubTotalServiceChargeContributionAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部服务费贡献'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部服务费贡献
									<el-tooltip
										class="item"
										effect="dark"
										content="德州俱乐部服务费贡献=局服务费贡献+手牌服务费贡献"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										serviceFeeContributionDialogFn(
											scope.row
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubTotalServiceChargeContributionAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxClubNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxSquidNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员鱿鱼游戏盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxSquidNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxSquidNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'德州保险注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.dxInsureBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxInsureBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxInsureValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxInsureNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxValueAddedTotalAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州增值服务消费'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州增值服务消费
									<el-tooltip
										class="item"
										effect="dark"
										content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<!-- <el-link
									class="lightBlueColor"
									type="primary"
									@click="clubAmountDialogFn(scope.row)"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxValueAddedTotalAmount
										)
									}}
								</el-link> -->
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxValueAddedTotalAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.dxClubProxyRebateAmount,
											scope.row
												.dxClubPlatformRebateAmount,
											'德州'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="德州场馆盈亏=德州俱乐部投注盈亏+会员鱿鱼游戏盈亏+德州俱乐部局服务费+德州保险投注盈亏+德州增值服务消费+德州俱乐部会员返水"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
					<el-table-column
						v-if="activeName === 'all'"
						align="center"
						label="其他场馆流水输赢"
					>
						<el-table-column
							prop="otherBetCount"
							align="center"
							min-width="150"
							:label="'注单量'"
							sortable
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.otherBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'全部'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'全部'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.otherProxyRebateAmount,
											scope.row.otherPlatformRebateAmount,
											'其他'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'全部'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他收支项'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他收支项
									<el-tooltip
										class="item"
										effect="dark"
										content="其他收支项=真人场馆真人打赏金额+电子场馆电子活动奖金金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="otherDialogFn(scope.row)"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆盈亏=其他场馆投注盈亏+其他场馆投注盈亏重算调整+其他场馆会员返水+其他场馆会员返水重算调整+其他收支项"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
					<el-table-column
						v-if="activeName === 'all'"
						align="center"
						label="其他盈亏"
					>
						<el-table-column
							prop="accountAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'账户调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										accountAdjustmentDialogFn(scope.row)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.accountAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="rebateAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'返水调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.rebateAdjustmentAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="netProfit"
							align="center"
							sortable
							min-width="200"
							:label="'其他盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="其他盈亏=账户调整+返水调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(scope.row.netProfit)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.netProfit
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
					<el-table-column
						v-if="activeName === 'all'"
						align="center"
						label="全部场馆汇总"
					>
						<el-table-column
							prop="betCount"
							align="center"
							min-width="150"
							:label="'总注单量'"
							sortable
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.betCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="betAmount"
							align="center"
							sortable
							min-width="200"
							:label="'总投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{ handleNumber('USDT', scope.row.betAmount) }}
							</template>
						</el-table-column>
						<el-table-column
							prop="validBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'总有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.validBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="rebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'总返水'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									总返水
									<el-tooltip
										class="item"
										effect="dark"
										content="总返水=全部场馆会员返水+会员返水重算调整+会员返水调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.rebateAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="betNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'总投注盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									总投注盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="总投注盈亏=德州俱乐部投注盈亏+会员鱿鱼游戏盈亏+德州保险投注盈亏+其他场馆投注盈亏+其他场馆投注盈亏重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.betNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.betNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="netAmount"
							align="center"
							min-width="200"
							sortable
							show-overflow-tooltip
							:label="'总盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									总盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="总盈亏=德州俱乐部投注盈亏+会员鱿鱼游戏盈亏+德州俱乐部局服务费+德州保险投注盈亏+德州增值服务消费+德州俱乐部会员返水+其他场馆投注盈亏+其他场馆投注盈亏重算调整+其他场馆会员返水+其他场馆会员返水重算调整+其他场馆其他收支项+会员账户调整+会员返水调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(scope.row.netAmount)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.netAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 德州场馆 -->
				<template>
					<el-table-column
						v-if="activeName === 'dz'"
						align="center"
						label="德州水保增"
					>
						<el-table-column
							prop="dxClubBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'德州俱乐部注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.dxClubBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeRoundAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部局服务费'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部局服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="统计会员被收取的局服务费"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxClubServiceChargeRoundAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeHandAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部手牌服务费'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部手牌服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="统计会员被收取的手牌服务费"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxClubServiceChargeHandAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubTotalServiceChargeContributionAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部服务费贡献'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部服务费贡献
									<el-tooltip
										class="item"
										effect="dark"
										content="德州俱乐部服务费贡献=局服务费贡献+手牌服务费贡献"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										serviceFeeContributionDialogFn(
											scope.row
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubTotalServiceChargeContributionAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxClubNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxSquidNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员鱿鱼游戏盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxSquidNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxSquidNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>

						<el-table-column
							prop="dxInsureBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'德州保险注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.dxInsureBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxInsureBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxInsureValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxInsureNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxValueAddedTotalAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州增值服务消费'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州增值服务消费
									<el-tooltip
										class="item"
										effect="dark"
										content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<!-- <el-link
									class="lightBlueColor"
									type="primary"
									@click="clubAmountDialogFn(scope.row)"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxValueAddedTotalAmount
										)
									}}
								</el-link> -->
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dxValueAddedTotalAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.dxClubProxyRebateAmount,
											scope.row
												.dxClubPlatformRebateAmount,
											'德州'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="德州场馆盈亏=德州俱乐部投注盈亏+会员鱿鱼游戏盈亏+德州俱乐部局服务费+德州保险投注盈亏+德州增值服务消费+德州俱乐部会员返水"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 其他 -->
				<template>
					<el-table-column
						v-if="activeName === 'other'"
						align="center"
						label="其他场馆流水输赢"
					>
						<el-table-column
							prop="otherBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.otherBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'其他'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'其他'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.otherProxyRebateAmount,
											scope.row.otherPlatformRebateAmount,
											'其他'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'其他'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他收支项'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他收支项
									<el-tooltip
										class="item"
										effect="dark"
										content="其他收支项=真人场馆真人打赏金额+电子场馆电子活动奖金金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="otherDialogFn(scope.row)"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆盈亏=其他场馆投注盈亏+其他场馆投注盈亏重算调整+其他场馆会员返水+其他场馆会员返水重算调整+其他收支项"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 体育 -->
				<template>
					<el-table-column
						v-if="activeName === 'ty'"
						align="center"
						label="体育场馆流水输赢"
					>
						<el-table-column
							prop="tyBetCount"
							align="center"
							sortable
							min-width="150"
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.tyBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.tyBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.tyValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'体育'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.tyValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.tyFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.tyNetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'体育'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.tyNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.tyFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.tyFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.tyProxyRebateAmount,
											scope.row.tyPlatformRebateAmount,
											'体育'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.tyVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'体育'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.tyMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>

						<el-table-column
							prop="tyMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="体育场馆盈亏=体育场馆投注盈亏+体育场馆投注盈亏重算调整+体育场馆会员返水+体育场馆会员返水重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.tyMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.tyMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 真人 -->
				<template>
					<el-table-column
						v-if="activeName === 'zr'"
						align="center"
						label="真人场馆流水输赢"
					>
						<el-table-column
							prop="zrBetCount"
							align="center"
							sortable
							min-width="150"
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.zrBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.zrBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.zrValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'真人'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.zrValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.zrFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.zrNetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'真人'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.zrNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.zrFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.zrFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.zrProxyRebateAmount,
											scope.row.zrPlatformRebateAmount,
											'真人'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.zrVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'真人'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.zrMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrRewardAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人打赏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.zrRewardAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="真人场馆盈亏=真人场馆投注盈亏+真人场馆投注盈亏重算调整+真人场馆会员返水+真人场馆会员返水重算调整+真人打赏"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.zrMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.zrMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 棋牌 -->
				<template>
					<el-table-column
						v-if="activeName === 'qp'"
						align="center"
						label="棋牌场馆流水输赢"
					>
						<el-table-column
							prop="qpBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.qpBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="qpBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.qpBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="qpValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.qpValidBetAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="qpNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.qpNetAmount)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="qpVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'棋牌场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.qpProxyRebateAmount,
											scope.row.qpPlatformRebateAmount,
											'棋牌'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.qpVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>

						<el-table-column
							prop="qpMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'棋牌场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									棋牌场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="棋牌场馆盈亏=棋牌场馆投注盈亏+棋牌场馆会员返水"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.qpMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.qpMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 电竞 -->
				<template>
					<el-table-column
						v-if="activeName === 'dj'"
						align="center"
						label="电竞场馆流水输赢"
					>
						<el-table-column
							prop="djBetCount"
							align="center"
							sortable
							min-width="150"
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.djBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="djBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.djBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.djValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'电竞'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.djValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="djFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.djFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.djNetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'电竞'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.djNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="djFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.djFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.djFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="djVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电竞场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.djProxyRebateAmount,
											scope.row.djPlatformRebateAmount,
											'电竞'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.djVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="djMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'电竞'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.djMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>

						<el-table-column
							prop="djMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电竞场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="电竞场馆盈亏=电竞场馆投注盈亏+电竞场馆投注盈亏重算调整+电竞场馆会员返水+电竞场馆会员返水重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.djMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.djMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>

				<!-- 彩票 -->
				<template>
					<el-table-column
						v-if="activeName === 'cp'"
						align="center"
						label="彩票场馆流水输赢"
					>
						<el-table-column
							prop="cpBetCount"
							align="center"
							sortable
							min-width="150"
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.cpBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.cpBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.cpValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.cpValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.cpFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.cpNetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.cpNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.cpFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.cpFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.cpProxyRebateAmount,
											scope.row.cpPlatformRebateAmount,
											'彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.cpVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.cpMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>

						<el-table-column
							prop="cpMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="彩票场馆盈亏=彩票场馆投注盈亏+彩票场馆投注盈亏重算调整+彩票场馆会员返水+彩票场馆会员返水重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.cpMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.cpMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- hc彩票 -->
				<template>
					<el-table-column
						v-if="activeName === 'hccp'"
						align="center"
						label="彩票场馆流水输赢"
					>
						<el-table-column
							prop="hccpBetCount"
							align="center"
							sortable
							min-width="150"
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.hccpBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.hccpBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.hccpValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'hc彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.hccpValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.hccpFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.hccpNetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'hc彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.hccpNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.hccpFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.hccpFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.hccpProxyRebateAmount,
											scope.row.hccpPlatformRebateAmount,
											'hc彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.hccpVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'hc彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.hccpMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>

						<el-table-column
							prop="hccpMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="彩票场馆盈亏=彩票场馆投注盈亏+彩票场馆投注盈亏重算调整+彩票场馆会员返水+彩票场馆会员返水重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.hccpMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.hccpMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 电子 -->
				<template>
					<el-table-column
						v-if="activeName === 'dy'"
						align="center"
						label="电子场馆流水输赢"
					>
						<el-table-column
							prop="dyBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.dyBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dyBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.dyBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dyValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dyValidBetAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="dyNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.dyNetAmount)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="dyVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子场馆会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.dyProxyRebateAmount,
											scope.row.dyPlatformRebateAmount,
											'电子'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dyVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="dyActivityBonusAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子活动奖金'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dyActivityBonusAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="dyMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电子场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="电子场馆盈亏=电子场馆投注盈亏+电子场馆会员返水+电子活动加奖金"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dyMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dyMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 自选场馆 -->
				<template>
					<el-table-column
						v-if="
							activeName === 'selfSelection' && venueCodes.length
						"
						align="center"
						:label="labelFn"
					>
						<el-table-column
							prop="countBetCount"
							align="center"
							min-width="150"
							sortable
							:label="'注单量'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span>
									{{ scope.row.countBetCount || 0 }}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="countBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注金额'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.countBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="countValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.countValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="countValidBetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'自选',
											venueCodes
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.countValidBetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="countFactValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际有效投注'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.countFactValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="countNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.countNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="countNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'投注盈亏重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentLossesDialogFn(
											scope.row,
											'自选',
											venueCodes
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.countNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="countFactNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'实际投注盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.countFactNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.countFactNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="countVenueMemberRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										memberReturnDialogFn(
											scope.row,
											scope.row.countProxyRebateAmount,
											scope.row.countPlatformRebateAmount,
											'自选'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.countVenueMemberRebateAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="countMemberRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水重算调整'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentBackflowDialogFn(
											scope.row,
											'自选'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.countMemberRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他收支项'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他收支项
									<el-tooltip
										class="item"
										effect="dark"
										content="其他收支项=真人场馆真人打赏金额+电子场馆电子活动奖金金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="otherDialogFn(scope.row)"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="countMemberVenueNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'自选场馆盈亏'"
							show-overflow-tooltip
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									自选场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										:content="'自选场馆的场馆盈亏之和'"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.countMemberVenueNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.countMemberVenueNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
			</el-table>
			<!-- 分页 -->
			<el-pagination
				v-show="!!total"
				class="pageValue"
				:current-page.sync="pageNum"
				background
				layout="total, sizes,prev, pager, next, jumper"
				:page-size.sync="pageSize"
				:page-sizes="pageSizes"
				:total="total"
				:pager-count="9"
				@current-change="handleCurrentChange"
				@size-change="handleSizeChange"
			></el-pagination>
		</template>
		<OtherDialog
			v-if="otherDialog"
			:visible.sync="otherDialog"
			@handleVisible="otherDialog = false"
			:curData="rowVal"
		/>
		<ServiceFeeContributionDialog
			v-if="serviceFeeContributionDialog"
			:visible.sync="serviceFeeContributionDialog"
			@handleVisible="serviceFeeContributionDialog = false"
			:curData="rowVal"
		/>
		<MemberReturnDialog
			v-if="memberReturnDialog"
			:visible.sync="memberReturnDialog"
			@handleVisible="memberReturnDialog = false"
			:curData="rowVal"
		/>

		<detail-page
			v-if="showDialog"
			:rowVal="rowVal"
			:closeDialog="
				(val) => {
					showDialog = val
				}
			"
		/>
		<detail-day-page
			v-if="showDayDialog"
			:rowVal="rowVal"
			:activeName="activeName"
			:venueCodes="venueCodes"
			:closeDialog="
				(val) => {
					showDayDialog = val
				}
			"
		/>
		<el-dialog
			:title="`自选场馆`"
			:visible.sync="selfSelectionDialog"
			width="950px"
			:before-close="cancelFn"
			:close-on-click-modal="false"
			class="rempadding"
			:destroy-on-close="true"
		>
			<div style="margin-top: 10px;position: relative">
				<span>选择场馆：</span>
				<el-checkbox-group
					v-model="venueCodes"
					style="display: inline-block;"
				>
					<el-checkbox
						v-for="(item, index) in selfSelectionList"
						:label="item.venueTypeCode"
						:key="index"
						style="margin-right: 1.2rem"
					>
						{{ item.venueTypeName }}
					</el-checkbox>
				</el-checkbox-group>
				<div
					v-if="tipTxt && !venueCodes.length"
					class="tipTxt redColor"
				>
					请选择场馆
				</div>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="cancelFn">
					关闭
				</el-button>
				<el-button type="primary" @click="selfSelectionSubmit">
					查询
				</el-button>
			</div>
		</el-dialog>
		<el-dialog
			:title="$t('common.row_set')"
			center
			:visible.sync="colSettings.visible"
			width="475px"
			class="setting-div"
		>
			<div>
				<el-link type="primary" class="mb15" @click="clickDel">
					复原缺省
				</el-link>
			</div>
			<div
				v-for="(value, name1) in activityListField"
				:key="name1"
				class="setting-div"
			>
				<el-checkbox v-model="dialogColumnData[name1]">
					{{ name1 }}
				</el-checkbox>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="colSettings.visible = false">
					{{ $t('common.cancel') }}
				</el-button>
				<el-button type="primary" @click="handleOrderList">
					{{ $t('common.submit') }}
				</el-button>
			</div>
		</el-dialog>
		<ClubAmountDialog
			v-if="clubAmountDialog"
			:visible.sync="clubAmountDialog"
			:searchTime="searchTime"
			@handleVisible="clubAmountDialog = false"
			:curData="rowVal"
		></ClubAmountDialog>
		<RecalculationAdjustmentDialog
			v-if="recalculationAdjustmentDialog"
			:visible.sync="recalculationAdjustmentDialog"
			:searchTime="searchTime"
			@handleVisible="recalculationAdjustmentDialog = false"
			:curData="rowVal"
		></RecalculationAdjustmentDialog>
		<RecalculationAdjustmentBackflowDialog
			v-if="recalculationAdjustmentBackflowDialog"
			:visible.sync="recalculationAdjustmentBackflowDialog"
			:searchTime="searchTime"
			:curData="rowVal"
			@handleVisible="recalculationAdjustmentBackflowDialog = false"
		></RecalculationAdjustmentBackflowDialog>
		<RecalculationAdjustmentLossesDialog
			v-if="recalculationAdjustmentLossesDialog"
			:searchTime="searchTime"
			:visible.sync="recalculationAdjustmentLossesDialog"
			@handleVisible="recalculationAdjustmentLossesDialog = false"
			:curData="rowVal"
		></RecalculationAdjustmentLossesDialog>
		<AccountAdjustmentDialog
			v-if="accountAdjustmentDialog"
			:visible.sync="accountAdjustmentDialog"
			@handleVisible="accountAdjustmentDialog = false"
			:curData="rowVal"
		></AccountAdjustmentDialog>
	</main-content>
</template>

<script>
import dayjs from 'dayjs'
import list from '@/mixins/list'
import { routerNames } from '@/utils/consts'
import summaryList from './components/summaryList'
import MainContent from '@/components/MainContent/index.vue'
import ClubAmountDialog from './components/clubAmountDialog.vue'
import RecalculationAdjustmentDialog from './components/recalculationAdjustmentDialog.vue'
import RecalculationAdjustmentLossesDialog from './components/recalculationAdjustmentLossesDialog.vue'
import RecalculationAdjustmentBackflowDialog from './components/recalculationAdjustmentBackflowDialog.vue'
import DatePickerShortcuts from '@/components/DatePickerShortcuts'
import OtherDialog from './components/otherDialog.vue'
import MemberReturnDialog from './components/memberReturnDialog.vue'
import AccountAdjustmentDialog from './components/accountAdjustmentDialog.vue'
import ServiceFeeContributionDialog from './components/serviceFeeContributionDialog.vue'

const start = dayjs()
	.startOf('day')
	.valueOf()
const end = dayjs()
	.endOf('day')
	.valueOf()
const setSearchTime = () => [
	dayjs()
		.startOf('day')
		.valueOf(),
	dayjs()
		.endOf('day')
		.valueOf()
]
export default {
	name: routerNames.memberProfitAndLoss,
	components: {
		DetailPage: () => import('./components/detail-page.vue'),
		DetailDayPage: () => import('./components/detail-day-page.vue'),
		MainContent,
		RecalculationAdjustmentDialog,
		RecalculationAdjustmentLossesDialog,
		RecalculationAdjustmentBackflowDialog,
		MemberReturnDialog,
		ServiceFeeContributionDialog,
		OtherDialog,
		AccountAdjustmentDialog,
		ClubAmountDialog,
		DatePickerShortcuts
	},
	mixins: [list, summaryList],
	data() {
		return {
			tableHeight: 480,
			activeName: 'all',
			otherDialog: false,
			tipTxt: false,
			showDayDialog: false,
			selfSelectionDialog: false,
			memberReturnDialog: false,
			serviceFeeContributionDialog: false,
			recalculationAdjustmentLossesDialog: false,
			recalculationAdjustmentBackflowDialog: false,
			otherDependenComponents: [],
			clubAmountDialog: false,
			accountAdjustmentDialog: false,
			recalculationAdjustmentDialog: false,
			venueCodes: [],
			venueCodesReset: [],
			queryData: {
				userName: undefined,
				parentProxyName: undefined,
				topProxyName: undefined,
				accountType: undefined,
				minBetCount: undefined,
				maxBetCount: undefined,
				minBetAmount: undefined,
				maxBetAmount: undefined,
				minNetAmount: undefined,
				maxNetAmount: undefined,
				minNetProfit: undefined,
				maxNetProfit: undefined
			},
			searchTime: setSearchTime(),
			accountFlag: 'userName',
			tabTable: true,
			tableData: [],
			unique: {
				all: 'listPageForTotal',
				dz: 'listPageForDZ',
				other: 'listPageForOther',
				ty: 'listPageForTY',
				zr: 'listPageForZR',
				qp: 'listPageForQP',
				dj: 'listPageForDJ',
				cp: 'listPageForCP',
				hccp: 'listPageForHCCP',
				dy: 'listPageForDY'
			},
			venueNameList: [
				{
					venueTypeName: '全部场馆',
					venueTypeCode: 'all'
				},
				{
					venueTypeName: 'DX德州',
					venueTypeCode: 'dz'
				},
				{
					venueTypeName: '其他场馆',
					venueTypeCode: 'other'
				},
				{
					venueTypeName: 'DB体育',
					venueTypeCode: 'ty'
				},
				{
					venueTypeName: 'DB真人',
					venueTypeCode: 'zr'
				},
				{
					venueTypeName: '博雅棋牌',
					venueTypeCode: 'qp'
				},
				{
					venueTypeName: 'DB电竞',
					venueTypeCode: 'dj'
				},
				{
					venueTypeName: 'DB彩票',
					venueTypeCode: 'cp'
				},
				{
					venueTypeName: 'HC彩票',
					venueTypeCode: 'hccp'
				},
				{
					venueTypeName: 'DB电子',
					venueTypeCode: 'dy'
				},
				{
					venueTypeName: '自选场馆',
					venueTypeCode: 'selfSelection'
				}
			],
			selfSelectionList: [
				{
					venueTypeName: 'DX德州',
					venueTypeCode: 'listPageForDZ',
					name: '德州',
					value: 'dz'
				},
				{
					venueTypeName: 'DB体育',
					venueTypeCode: 'listPageForTY',
					name: '体育',
					value: 'ty'
				},
				{
					venueTypeName: 'DB真人',
					venueTypeCode: 'listPageForZR',
					name: '真人',
					value: 'zr'
				},
				{
					venueTypeName: '博雅棋牌',
					venueTypeCode: 'listPageForQP',
					name: '棋牌',
					value: 'qp'
				},
				{
					venueTypeName: 'DB电竞',
					venueTypeCode: 'listPageForDJ',
					name: '电竞',
					value: 'dj'
				},
				{
					venueTypeName: 'DB彩票',
					venueTypeCode: 'listPageForCP',
					name: '彩票',
					value: 'cp'
				},
				{
					venueTypeName: 'HC彩票',
					venueTypeCode: 'listPageForHCCP',
					name: 'HC彩票',
					value: 'hccp'
				},
				{
					venueTypeName: 'DB电子',
					venueTypeCode: 'listPageForDY',
					name: '电子',
					value: 'dy'
				}
			],
			subSummary: {},
			totalSummary: {},
			venueCodeClick: false,
			showDialog: false,
			exportBtnLoading: false,
			rowVal: {},
			selectAllVenue: true,
			merchantObj: '',
			axiosDate: '',
			colSettings: {
				visible: false,
				dialogColumnData: {}
			},
			loading: false,
			activityListField: {
				// 会员姓名: true,
				// 账号类型: true,
				// 上级代理: true,
				// 所属商户: true,
				// 账号状态: true,
				// 会员标签: true,
				// 风控层级: true,
				// 注单量: true,
				// 投注金额: true,
				// 有效投注: true,
				// 投注盈亏: true,
				// 会员盈利率: true,
				// 净盈亏: true
				[this.$t('funds.capital_adjustment.member_nickname')]: true,
				[this.$t('common.number_type')]: true,
				[this.$t('common.top_agent')]: true,
				[this.$t('report.general_account')]: true,
				// [this.$t('common.belong_merchant')]: true,
				[this.$t('common.account_status')]: true,
				[this.$t('member.label_name')]: true,
				[this.$t('common.risk_control_level')]: true,
				[this.$t('report.bet_count')]: true,
				[this.$t('report.bet_amount')]: true,
				[this.$t('report.valid_bet_amount')]: true,
				[this.$t('report.net_amount')]: true,
				[this.$t('report.member_return_water')]: true,
				[this.$t('report.proxy_grant_member_rebate')]: true,
				[this.$t('report.platform_grant_member_rebate')]: true,
				返水其他调整: true,
				局服务费: true,
				增值服务消费: true,
				[this.$t('report.net_profit')]: true
			}
		}
	},
	computed: {
		labelFn() {
			const selfSelectionData = this.selfSelectionList
				.filter((ele2) => this.venueCodes.includes(ele2.venueTypeCode)) // 过滤出与 venueCodes 匹配的元素
				.map((ele2) => ele2.name)

			const venueName = selfSelectionData.join('/')
			return venueName + '场馆流水输赢'
		},
		accountTypeArr() {
			return this.globalDics.reportAccountType || []
		}
	},
	watch: {
		accountFlag: {
			handler(newVal, oldVal) {
				this.$set(this.queryData, newVal, '')
				this.$set(this.queryData, oldVal, '')
			}
		},
		'queryData.venueTypes': {
			handler(newVal) {
				if (newVal.length === this.venueNameList.length) {
					this.selectAllVenue = true
				} else {
					this.selectAllVenue = false
				}
			}
		}
	},
	created() {
		// this.loadReportGetVenueGames()
		this.getRouteQuery(true)
		this.$store.dispatch('user/updateCurrentAccountPeriod')
		this.initIndexDB('memberProfitAndLoss', this.activityListField)
	},
	mounted() {},
	methods: {
		cancelFn() {
			this.selfSelectionDialog = false
			this.venueCodeClick = false
			this.venueCodes = JSON.parse(JSON.stringify(this.venueCodesReset))
		},
		getVenueName(val) {
			// getVenueListWithoutPage
			this.selfSelectionList = []
			this.$api
				.getReportVenueNameList({
					venueType: val || undefined
				})
				.then((res) => {
					if (res.data && res.data.length > 0) {
						this.loading = false
						this.selfSelectionList = res.data
						for (const item of this.selfSelectionList) {
							this.venueCodes.push(item.gameCode)
						}
					}
					const sortOrder = [
						'德州扑克',
						'PM体育',
						'PM真人',
						'博雅棋牌',
						'PM电竞',
						'PM彩票'
					]
					this.customSortOrder = this.customSortOrder(
						this.venueNameList,
						sortOrder
					)
				})
		},
		customSortOrder(data, sortOrder) {
			const sortedData = data.sort((a, b) => {
				const indexA = sortOrder.indexOf(a.venueName)
				const indexB = sortOrder.indexOf(b.venueName)
				return indexA - indexB
			})
			return sortedData
		},
		beforeLeave(activeName, oldActiveName) {
			if (this.venueCodeClick || activeName !== 'selfSelection') return
			this.venueCodeClick = true
			return new Promise((resolve, reject) => {
				if (activeName === 'selfSelection') {
					this.venueCodes = []
					this.venueCodesReset = []
					this.selfSelectionDialog = true
					reject()
				} else {
					resolve()
				}
			})
		},
		tabClick(val) {
			this.tabTable = false

			this.$nextTick(() => {
				this.tabTable = true
				this.queryData.orderKey = undefined
				this.queryData.orderType = undefined
				if (val.name === 'selfSelection') {
					// this.getVenueName()
					// if (!this.venueCodes.length) {
					// 	for (const item of this.selfSelectionList) {
					// 		this.venueCodes.push(item.venueTypeCode)
					// 	}
					// }
					this.venueCodesReset = JSON.parse(
						JSON.stringify(this.venueCodes)
					)
					this.selfSelectionDialog = true
				} else {
					this.loadData()
				}
			})
		},
		otherDialogFn(val) {
			this.rowVal = val
			this.otherDialog = true
		},
		serviceFeeContributionDialogFn(val) {
			this.rowVal = val
			this.serviceFeeContributionDialog = true
		},
		memberReturnDialogFn(val, itemValue1, itemValue2, venueName) {
			this.rowVal = val
			this.rowVal.itemValue1 = itemValue1
			this.rowVal.itemValue2 = itemValue2
			this.rowVal.venueName = venueName
			this.memberReturnDialog = true
		},

		accountAdjustmentDialogFn(val) {
			this.rowVal = val
			this.accountAdjustmentDialog = true
		},
		clubAmountDialogFn(row) {
			this.rowVal = row
			this.clubAmountDialog = true
		},
		loadReportGetVenueGames() {
			this.$api.getReportGetVenueGames().then((res) => {
				this.venueNameList = res.data.gameList
			})
		},

		customSortOrder(data, sortOrder) {
			const sortedData = data.sort((a, b) => {
				const indexA = sortOrder.indexOf(a.venueType)
				const indexB = sortOrder.indexOf(b.venueType)
				return indexA - indexB
			})
			return sortedData
		},
		handleShortcutBtnClick(val) {
			this.searchTime = val
			this.loadData()
		},

		handleClick(val) {
			console.log(val)
		},
		recalculationAdjustmentDialogFn(val, venueName) {
			this.pageNum = 1
			this.rowVal = val
			this.rowVal.venueName = venueName
			if (this.rowVal.venueName === '自选') {
				const selfSelectionData = this.selfSelectionList
					.filter((ele2) =>
						this.venueCodes.includes(ele2.venueTypeCode)
					) // 过滤出与 venueCodes 匹配的元素
					.map((ele2) => ele2.value) // 提取这些元素的 value 属性并组成新数组
				this.rowVal.selfSelectionCodes = selfSelectionData.join(',')
			}
			this.recalculationAdjustmentDialog = true
		},
		recalculationAdjustmentBackflowDialogFn(val, venueName) {
			this.pageNum = 1
			this.rowVal = val
			this.rowVal.venueName = venueName
			if (this.rowVal.venueName === '自选') {
				const selfSelectionData = this.selfSelectionList
					.filter((ele2) =>
						this.venueCodes.includes(ele2.venueTypeCode)
					) // 过滤出与 venueCodes 匹配的元素
					.map((ele2) => ele2.value) // 提取这些元素的 value 属性并组成新数组
				this.rowVal.selfSelectionCodes = selfSelectionData.join(',')
			}
			this.recalculationAdjustmentBackflowDialog = true
		},

		recalculationAdjustmentLossesDialogFn(val, venueName) {
			this.pageNum = 1
			this.rowVal = val
			this.rowVal.venueName = venueName
			if (this.rowVal.venueName === '自选') {
				const selfSelectionData = this.selfSelectionList
					.filter((ele2) =>
						this.venueCodes.includes(ele2.venueTypeCode)
					) // 过滤出与 venueCodes 匹配的元素
					.map((ele2) => ele2.value) // 提取这些元素的 value 属性并组成新数组
				this.rowVal.selfSelectionCodes = selfSelectionData.join(',')
			}

			this.recalculationAdjustmentLossesDialog = true
		},
		selfSelectionSubmit() {
			if (!this.venueCodes.length) {
				this.tipTxt = true
				return
			}
			this.venueCodeClick = true
			this.activeName = 'selfSelection'
			this.selfSelectionDialog = false
			this.loadData('自选')
		},
		// 路由跳转
		getRouteQuery(isLoadData = false) {
			if (this.$route.query?.userName) {
				this.$set(
					this.queryData,
					'userName',
					!this.$route.query?.userType
						? this.$route.query?.userName
						: undefined
				)
				this.$set(
					this.queryData,
					'parentProxyName',
					this.$route.query?.userType
						? this.$route.query?.userName
						: undefined
				)
				this.searchTime = [
					this.$route.query?.startDate || start,
					this.$route.query?.endDate || end
				]
				this.$router.replace({ query: {} })
				if (isLoadData) {
					this.loadData()
				}
			}
		},
		// 提交列设置数据
		handleOrderList() {
			this.colSettings.visible = false
			this.updateIndexDB()
		},
		// 打开列设置弹框
		openColSettings() {
			this.getIndexDB(this.activityListField)
			this.colSettings.visible = true
		},
		clickDel() {
			this.dialogColumnData = {}
			this.dialogColumnData = {
				// 会员姓名: true,
				// 账号类型: true,
				// 上级代理: true,
				// 所属商户: true,
				// 账号状态: true,
				// 会员标签: true,
				// 风控层级: true,
				// 注单量: true,
				// 投注金额: true,
				// 有效投注: true,
				// 投注盈亏: true,
				// 会员盈利率: true,
				// 净盈亏: true
				[this.$t('funds.capital_adjustment.member_nickname')]: true,
				[this.$t('common.number_type')]: true,
				[this.$t('common.top_agent')]: true,
				[this.$t('report.general_account')]: true,
				// [this.$t('common.belong_merchant')]: true,
				[this.$t('common.account_status')]: true,
				[this.$t('member.label_name')]: true,
				[this.$t('common.risk_control_level')]: true,
				[this.$t('report.bet_count')]: true,
				[this.$t('report.bet_amount')]: true,
				[this.$t('report.valid_bet_amount')]: true,
				[this.$t('report.net_amount')]: true,
				[this.$t('report.member_return_water')]: true,
				[this.$t('report.proxy_grant_member_rebate')]: true,
				[this.$t('report.platform_grant_member_rebate')]: true,
				['返水其他调整']: true,
				['局服务费']: true,
				[this.$t('report.net_profit')]: true
			}
		},
		changeTableSort({ column, prop, order }) {
			this.queryData.orderKey = prop
			if (order === 'ascending') {
				// 升序
				this.queryData.orderType = 'asc'
			} else if (column.order === 'descending') {
				// 降序
				this.queryData.orderType = 'desc'
			} else {
				delete this.queryData.orderKey
				delete this.queryData.orderType
			}
			this.loadData()
		},
		loadData(venueCodes) {
			console.log(this.activeName, 'xxxx')
			if (+new Date() - 500 < this.axiosDate) return
			const timeArr = this.searchTime || []
			const unique = this.unique[this.activeName]
			const params = {
				...this.queryData,
				startDate: dayjs(timeArr[0]).format('YYYYMMDD') * 1,
				endDate: dayjs(timeArr[1]).format('YYYYMMDD') * 1,
				unique,
				...this.getParams()
			}
			// const min = dayjs(timeArr[0])
			// const max = dayjs(timeArr[1])
			// const day = dayjs(max).diff(min, 'day')
			// if (day >= 31) {
			// 	this.$message.warning(this.$t('report.31_day'))
			// 	this.total = 0
			// 	return
			// }
			this.loading = true
			this.pageCurrency = this.merchantObj?.currency || ''
			if (this.venueCodes.length && this.activeName === 'selfSelection') {
				params.venueTypes = this.venueCodes
			} else {
				delete params.venueTypes
			}
			for (const k in params) {
				if (params[k] === '' || params[k] === undefined) {
					delete params[k]
				}
			}
			// setTimeout(() => {
			// 	this.venueCodeClick = false
			// }, 500)
			this.$api
				.getMemberListPage(params)
				.then((res) => {
					this.loading = false
					this.axiosDate = +new Date()
					if (res.code === 200) {
						this.tableData = res?.data?.record || []

						this.total = res?.data?.totalRecord || 0
						this.subSummary = res?.data?.summary || {}
					}
				})
				.catch(() => {
					this.loading = false
				})
				.finally(() => {
					this.venueCodeClick = false
				})
			this.$api
				.getMembernetamountRecallSummary(params)
				.then((res) => {
					this.loading = false
					if (res.code === 200) {
						this.totalSummary = res?.data || {}
					}
				})
				.catch(() => {
					this.loading = false
				})
		},
		search() {
			this.pageNum = 1
			this.loadData()
		},
		dialogData(val, day) {
			const timeArr = this.searchTime || []
			this.pageNum = 1
			this.rowVal = {
				playerId: val.memberId,
				parentProxyId: val.parentProxyId,
				memberName: val.memberName,
				startDate: dayjs(timeArr[0]).format('YYYYMMDD'),
				endDate: dayjs(timeArr[1]).format('YYYYMMDD')
			}
			if (day) {
				this.showDayDialog = true
			} else {
				this.showDialog = true
			}
		},
		reset() {
			this.pageNum = 1
			this.merchantObj = ''
			this.queryData = {
				userName: undefined,
				parentProxyName: undefined,
				topProxyName: undefined,
				minBetCount: undefined,
				maxBetCount: undefined,
				minBetAmount: undefined,
				maxBetAmount: undefined,
				minNetAmount: undefined,
				maxNetAmount: undefined,
				minNetProfit: undefined,
				maxNetProfit: undefined
			}
			if (this.$refs.tableSort) {
				this.$refs.tableSort.clearSort()
			}
			this.searchTime = setSearchTime()
			this.accountFlag = 'userName'

			this.loadData()
		},
		handleExportExcel() {
			const timeArr = this.searchTime || []
			const unique = this.unique[this.activeName]
			const params = {
				...this.queryData,
				unique,
				startDate: dayjs(timeArr[0]).format('YYYYMMDD') * 1,
				endDate: dayjs(timeArr[1]).format('YYYYMMDD') * 1
			}
			if (this.venueCodes.length && this.activeName === 'selfSelection') {
				params.venueTypes = this.venueCodes
			} else {
				delete params.venueTypes
			}
			// const min = dayjs(timeArr[0])
			// const max = dayjs(timeArr[1])
			// const day = dayjs(max).diff(min, 'day')
			// if (day >= 31) {
			// 	this.$message.warning(this.$t('report.31_day'))
			// 	return
			// }

			for (const k in params) {
				if (params[k] === '' || params[k] === undefined) {
					delete params[k]
				}
			}
			this.exportBtnLoading = true
			this.exportExcelPublic({
				api: 'getReportMembernetamountExport',
				params
			}).finally(() => {
				this.exportBtnLoading = false
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.tips-box {
	position: absolute;
	right: 10px;
	top: 50%;
	margin-top: -12px;
}
::v-deep .el-dialog__header {
	color: #909399;
	font-weight: 700;
}
::v-deep .el-table__fixed-footer-wrapper .cell,
::v-deep .el-table__footer-wrapper .cell {
	height: 100%;
	padding: 0 !important;
	margin: 0 !important;
	> div {
		height: 100%;
	}
}
::v-deep .footer_count_row {
	min-height: 50px;
	height: 50%;
	display: flex;
	font-weight: 700;
	padding: 5px 0;
	align-items: center;
	flex-direction: column;
	justify-content: center;
}
::v-deep .footer_count_row_border {
	border-top: 1px solid #ebeef5;
}
::v-deep .is-group th {
	background-color: #f5f7fa !important;
}
::v-deep .el-icon-question:after {
	font-size: 16px;
	margin-left: 0;
}
::v-deep .el-table th.el-table__cell > .cell {
	text-align: center;
}
.tipTxt {
	position: absolute;
	left: 72px;
	top: 23px;
}
</style>
